<?php

/*
|--------------------------------------------------------------------------
| Admin Routes
|--------------------------------------------------------------------------
|
| 后台路由文件
|
*/

// 登录注册
Route::get('/login', 'Auth\LoginController@showLoginForm')->name('admin.login');
Route::post('/login', 'Auth\LoginController@login')->name('admin.login.submit');
Route::post('/logout', 'Auth\LoginController@logout')->name('admin.logout');

// 通过认证后的路由集合
Route::group(['middleware' => 'auth:admin'], function () {
    Route::get('article/banner', 'ArticleController@banner');
    Route::get('article/setting', 'ArticleController@setting');

    Route::get('/', 'HomeController@index')->name('admin.home');
    Route::resource('admin', 'AdminController');
    Route::resource('user', 'UserController');
});
